home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_200 / 227_01 / herc.h < prev    next >
Text File  |  1988-02-07  |  2KB  |  48 lines

  1. /*
  2.  * h e r c . h
  3.  * -----------
  4.  * Low-level header file for the hercules monochrome graphics card.
  5.  * Defines all hardware-specific parameters. Does a #define HERCGRAF 1
  6.  * to identify hercules mode.
  7.  *
  8.  * update history
  9.  * --------------
  10.  * May, 28. 1987     compatibility macro "setmode()" added.
  11.  *
  12.  * Written by        Rainer Gerhards
  13.  *                   Petronellastr. 6
  14.  *                   D-5112 Baesweiler
  15.  *                   West Germany
  16.  *                   Phone (49) 2401 - 1601
  17.  */
  18.  
  19. /*
  20.  * definiton of hardware-dependent constants:
  21.  */
  22. #define GREEN    1                          /* color green */
  23. #define MLXPORT  0x03bf                     /* Crt. Port */
  24. #define CRTPORT  0x03b8                     /* Enable/Disable Board Port */
  25. #define HERCGRAF 1                          /* Hercules-library */
  26. #define MAX_X    720                        /* Pixelanzahl in x-Richtung */
  27. #define MAX_Y    348                        /* Pixelanzahl in y-Richtung */
  28. #define X_LOW    0                          /* lowest x coordinate */
  29. #define X_HIGH   719                        /* highest x coordinate */
  30. #define Y_LOW    0                          /* lowest y coordinate */
  31. #define Y_HIGH   347                        /* highest y coordinate */
  32. #define BYGRAFP  0x8000                     /* Num. bytes for graphics page */
  33. #define BYTEXTP  80 * 25                    /* Num. bytes for text page */
  34. #define TEXTMODE 0                          /* textmode id */
  35. #define GRAFMODE 6                          /* graphics mode id */
  36.  
  37. /*
  38.  * for compatibility with the other graphics devices
  39.  */
  40. #define setmode(x) if((((x) >= 0x04) && ((x) <= 0x06)) || \
  41.                       (((x) >= 0x0d) && ((x) <= 0x10))    \
  42.                      )                                    \
  43.                      initgraf(-1);                        \
  44.                    else                                   \
  45.                      exitgraf(-1);
  46. #ifdef    LIB_MODE
  47.     extern void    setbyte(int, int, int);
  48. #endif